//
//  ViewController.m
//  YKKit
//
//  Created by 马洪伟 on 16/1/12.
//  Copyright © 2016年 悦康动力（北京）科技有限公司. All rights reserved.
//

#import "ViewController.h"
#import "NSObject+YKSwizzle.h"
#import "YKPopoverView.h"
#import "YKWebViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    // Do any additional setup after loading the view, typically from a nib.
//    NSError *error;
//    [ViewController yk_SwizzleMethod:nil withMethod:nil error:nil];
//    if (error) {
//        NSLog(@"%@",error.localizedDescription);
//    }
//    [self aaa];
//    
//    
//    YKPopoverView *popoverView = [[YKPopoverView alloc] init];
//    UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
//    contentView.backgroundColor = [UIColor redColor];
//    popoverView.contentView = contentView;
//    contentView.center = popoverView.center;
//    [popoverView showInView:self.view animation:YKPopoverViewAnimationAlert];
//    popoverView.hideBlock = ^{
//        NSLog(@"a");
//    };
}

- (void)aaa {
    NSLog(@"2");
}

- (void)bbb {
//    [self bbb];
    NSLog(@"1");
}

- (IBAction)doClickButton:(id)sender {
    YKWebViewController *webVC = [[YKWebViewController alloc] init];
    webVC.shouldShowWebContentTitle = YES;
    webVC.url = [NSURL URLWithString:@"http://m.baidu.com"];
    [self.navigationController pushViewController:webVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
